package com.mobzilla.activity;

import android.app.Activity;
import android.os.Bundle;
import android.view.View;
import android.view.View.OnClickListener;
import android.widget.Button;
import android.widget.TextView;

import com.mobzilla.model.Bug;

public class BugDetailsViewActivity extends Activity implements OnClickListener
{
	private static Bug bug;
	private static String s;
	
	@Override
	public void onCreate(Bundle savedInstanceState)
	{
		super.onCreate(savedInstanceState);
		setContentView(R.layout.bugdetails);
		
		initListeners();
		
		showDetails();
	}
	
	public void initListeners()
	{
		Button backButton = (Button)findViewById(R.id.backButton);
		
		backButton.setOnClickListener(this);
	}
	
	public void onClick(View v)
	{
		finish();
	}
	
	private void showDetails()
	{
		TextView detailsTextField = (TextView)findViewById(R.id.fullBugDetailsView);
		
		detailsTextField.setText(bug.getDetails());
	}
	
	public static void setBug(Bug b)
	{
		bug = b;
	}
	
	public static void setS(String str)
	{
		s = str;
	}
}
